#@layout()
#define main()
<h1>借书管理&nbsp;&nbsp;
    <a href="/borrow/add">创建借书</a>
</h1>
#include("_search.html")
<div class="table_box">
    <table class="list">
        <tbody>
        <tr>
            <th width="4%" style="text-align:center;">id</th>
            <th width="15%" style="text-align:center;">学生学号</th>
            <th width="15%" style="text-align:center;">图书索引号</th>
            <th width="15%" style="text-align:center;">图书副本编号</th>
            <th width="13%" style="text-align:center;">借书时间</th>
            <th width="5%" style="text-align:center;">天数</th>
            <th width="5%" style="text-align:center;">状态</th>
            <th width="13%" style="text-align:center;">还书时间</th>
            <th width="35%" style="text-align:center;">操作</th>
        </tr>

        #for(x : borrowPage.getList())
        <tr>
            <td style="text-align:center;">#(x.id)</td>
            <td style="text-align:center;">#(x.studentid)</td>
            <td style="text-align:center;">#(x.bookid)</td>
            <td style="text-align:center;">#(x.bookcopyid)</td>
            <td style="text-align:center;">#(x.borrowtime)</td>
            <td style="text-align:center;">#(x.days)</td>
            <td style="text-align:center;">#(x.isback==0?"借书":"还书")</td>
            <td style="text-align:center;">#(x.backtime)</td>
            <td style="text-align:center;">
                &nbsp;&nbsp;<a href="/borrow/delete/#(x.id)">删除</a>
                &nbsp;&nbsp;<a href="/borrow/edit/#(x.id)">修改</a>
                &nbsp;&nbsp;<a href="/borrow/back/#(x.id)">还书</a>
            </td>
        </tr>
        #end
        </tbody>
    </table>
    #@paginate(borrowPage.pageNumber, borrowPage.totalPage, "/borrow/")
</div>
#end